﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CardWarWEB
{
    [Serializable]
    public class iSkill
    {
        public int ID;
        public int Hash;
        public string Name;
        public string Note;
        public iTypes Type;
        public CardWarWEB.iTypes SType;
        public iClasses Class;
        public CardWarWEB.iClasses iClass;
        public iProperties Properties;

        public long ATK;
        public long UP;
        public long DOWN;

        public bool canLevelup;
        public int Level;
        public int MaxLevel;

        public long UpEXP;
        public long NowEXP;
        public long GrowATK;
        public long GrowUP;
        public long GrowDOWN;

        public bool canPaid;
        public bool isUP;
        public long Paid;
        public int Cost;

        public bool Show = true;

        public static iSkill Get(int i)
        {
            iSkill s = null;
            #region 时空打击 物理 伤害 时空 普通 通用 0
            if (i == 0)
            {
                s = new iSkill();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "时空打击";
                s.Type = iTypes.物理;
                s.Class = iClasses.伤害;
                s.Properties = iProperties.时空;
                s.SType = CardWarWEB.iTypes.普通;
                s.iClass = CardWarWEB.iClasses.通用;
                s.canLevelup = true;
                s.Level = 1;
                s.MaxLevel = 40;
                s.NowEXP = 0;
                s.UpEXP = 50;
                s.ATK = 1000;
                s.UP = 366;
                s.DOWN = -181;
                s.Note = "扭曲时空进行一次打击，造成%DOWN-%UP点伤害";
                s.GrowATK = 76;
                s.GrowUP = 31;
                s.GrowDOWN = -18;
                s.canPaid = false;
                s.isUP = true;
                s.Paid = 0;
                s.Cost = 1;
            }
            #endregion
            #region 聚能 物理 支援 时空 普通 通用 1
            else if (i == 1)
            {
                s = new iSkill();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "聚能";
                s.Type = iTypes.物理;
                s.Class = iClasses.支援;
                s.Properties = iProperties.时空;
                s.SType = CardWarWEB.iTypes.普通;
                s.iClass = CardWarWEB.iClasses.通用;
                s.canLevelup = true;
                s.Level = 1;
                s.MaxLevel = 40;
                s.NowEXP = 0;
                s.UpEXP = 50;
                s.ATK = 3000;
                s.UP = 379;
                s.DOWN = -188;
                s.Note = "进行一次聚能，本回合时空增长提升%DOWN-%UP点";
                s.GrowATK = 148;
                s.GrowUP = 30;
                s.GrowDOWN = -20;
                s.canPaid = false;
                s.isUP = true;
                s.Paid = 0;
                s.Cost = 3;
            }
            #endregion
            #region 自利 辅助 支援 光明 普通 通用 2
            else if (i == 2)
            {
                s = new iSkill();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "自利";
                s.Type = iTypes.辅助;
                s.Class = iClasses.支援;
                s.Properties = iProperties.光明;
                s.SType = CardWarWEB.iTypes.普通;
                s.iClass = CardWarWEB.iClasses.通用;
                s.canLevelup = false;
                s.Level = 1;
                s.MaxLevel = 1;
                s.NowEXP = 0;
                s.UpEXP = 0;
                s.ATK = 0;
                s.UP = 0;
                s.DOWN = 0;
                s.Note = "解除所有负面效果！";
                s.GrowATK = 0;
                s.GrowUP = 0;
                s.GrowDOWN = 0;
                s.canPaid = false;
                s.isUP = false;
                s.Paid = 0;
                s.Cost = 2;
            }
            #endregion
            #region 自然守护 辅助 支援 自然 普通 通用 2
            else if (i == 3)
            {
                s = new iSkill();
                s.ID = i;
                s.Hash = Guid.NewGuid().GetHashCode();
                s.Name = "自然守护";
                s.Type = iTypes.辅助;
                s.Class = iClasses.支援;
                s.Properties = iProperties.自然;
                s.SType = CardWarWEB.iTypes.普通;
                s.iClass = CardWarWEB.iClasses.通用;
                s.canLevelup = false;
                s.Level = 1;
                s.MaxLevel = 40;
                s.NowEXP = 0;
                s.UpEXP = 50;
                s.ATK = 400;
                s.UP = 0;
                s.DOWN = 0;
                s.Note = "在两回合内，自然抗性提升" + s.ATK + "点";
                s.GrowATK = 40;
                s.GrowUP = 0;
                s.GrowDOWN = 0;
                s.canPaid = false;
                s.isUP = false;
                s.Paid = 0;
                s.Cost = 2;
            }
            #endregion
            return s;

        }

        [Serializable]
        public enum iTypes
        {
            物理,
            魔法,
            混合,
            辅助
        }
        [Serializable]
        public enum iClasses
        {
            伤害,
            支援,
            减免,
            削弱
        }
        [Serializable]
        public enum iProperties
        {
            火焰, 冰霜, 自然, 风水, 光明, 暗影, 时空
        }
    }
}
